<template>
	<view :style="themeColor">
		<view class="page">
			<view class="flex benben-position-layout flex flex-wrap align-center news_flex_0"
				:style="{height:(88+StatusBarRpx)+'rpx',paddingTop:StatusBarRpx+'rpx', }">
				<view class='flex flex-wrap align-center justify-between flex-sub news_fd0_0'>
					<view class='flex flex-wrap align-center news_fd0_0_c0' @tap.stop="handleJumpDiy" data-type="back"
						data-url="1">
						<text class='fu-iconfont2  news_fd0_0_c0_c0'>&#xe794;</text>
					</view>
					<text class='news_fd0_0_c1' v-if=" type=='1'">平台公告</text>
					<text class='news_fd0_0_c1' v-if=" type=='2'">服务订单</text>
					<!-- <text class='news_fd0_0_c1' v-if=" type=='3'">商城订单</text> -->
					<view class='flex flex-wrap align-center news_fd0_0_c0'>
					</view>
				</view>

			</view>
			<view :style="{height: (88+StatusBarRpx)+'rpx'}"></view>
			<!---flex布局flex布局开始-->
			<view class="flex flex-direction flex-wrap align-stretch justify-center benben-flex-layout">
				<template v-for='(item,key0) in newList'>
					<view class='flex flex-direction flex-wrap align-stretch news_fd1_0'
						@tap.stop="goMessagejumpFunc(item)" :key='key0'>
						<view class='flex flex-wrap align-center justify-between'>
							<text class='flex-sub news_fd1_0_c0_c0'>{{item.title}}</text>
							<text class='news_fd1_0_c0_c1' v-if=" item.is_read=='1'">已读</text>
							<text class='news_fd1_0_c0_c2' v-if=" item.is_read==0">未读</text>
						</view>
						<text class='news_fd1_0_c1'>{{item.content}}</text>
						<text class='news_fd1_0_c2'>{{item.create_time}}</text>
					</view>
				</template>
				<fu-empty :pagingListLoadedAll="pagingListLoadedAll" :pagingListNoListData="pagingListNoListData"
					:listDataLength="listDataLength" :isLoadInit="isLoadInit"></fu-empty>
			</view>

			<!---flex布局flex布局结束-->


		</view>
	</view>
</template>
<script>
	import pagingList from '@/common/mixin/paging_list.js';
	import {
		validate
	} from '@/common/utils/validate.js'

	export default {
		components: {},
		mixins: [pagingList],

		data() {
			return {
				"minixPagingListsApi": "",
				"pageingListApiMethod": "",
				"allowOnloadGetList": false,
				"newList": [],
				"type": ""
			};
		},
		computed: {
			themeColor() {
				return this.$store.getters.themeColor
			},

		},
		watch: {},
		onLoad(options) {
			let {
				type
			} = options
			if (type !== undefined) this.type = type
		},
		onUnload() {

		},
		onReady() {

		},
		onShow() {
			this.getNewListFunc()
		},
		onHide() {

		},
		onResize() {

		},
		onPullDownRefresh() {
			this.getNewListFunc()
		},
		onReachBottom(e) {

		},
		onPageScroll(e) {

		},
		methods: {
			//获取消息信息
			getNewListFunc() {
				this.minixPagingListsApi = global.apiUrls.post63a6b37b11702;
				this.pageingListApiMethod = 'get';
				this.allowOnloadGetList = false;
				this.pagingListPostDataContent = {
					type: this.type
				}
				this.listData = [];
				this.newList = this.listData;
				this.pagingListToggle();

			},
			//消息跳转
			goMessagejumpFunc(item) {
				if (this.type == '1') {
					this.$urouter.navigateTo(`/pages/index/newDetails/newDetails?id=${item.aid}`);
				} else if (this.type == '2') {
					this.$urouter.navigateTo(
						`/pages/index/orderDetails/orderDetails?aid=${item.duixiangid}&message_id=${item.aid}`);
				} else if (this.type == '3') {
					this.$urouter.navigateTo(
						`/pages/newShop/shopDetailes/shopDetailes?order_id=${item.duixiangid}&message_id=${item.aid}`);
				}
			},
			pagingListPostData() {
				return this.pagingListPostDataContent
			}
		}
	};
</script>
<style lang="scss" scoped>
	.page {
		width: 100vw;
		overflow-x: hidden;
		min-height: calc(100vh - var(--window-bottom));
		background: rgba(250, 250, 250, 1);
		background-size: 100% auto;
	}

	.news_flex_0 {
		// border-bottom: 1px solid #eee;
		background: #fff;
		width: 750rpx;
		height: 88rpx;
		overflow: hidden;
		z-index: 10;
		top: 0rpx;
		background-size: 100% auto !important;
	}

	.news_fd0_0_c1 {
		font-size: 36rpx;
		font-weight: 500;
		color: #333;
	}

	.news_fd0_0_c0_c0 {
		font-size: 32rpx;
		color: #333;
	}

	.news_fd0_0_c0 {
		width: 120rpx;
		height: 88rpx;
	}

	.news_fd0_0 {
		padding: 0rpx 32rpx 0rpx 32rpx;
		height: 88rpx;
	}

	.news_fd1_0_c2 {
		margin: 24rpx 0rpx 0rpx 0rpx;
		text-align: right;
		line-height: 33rpx;
		font-size: 24rpx;
		font-weight: 400;
		color: #999999;
	}

	.news_fd1_0_c1 {
		margin: 24rpx 0rpx 0rpx 0rpx;
		line-height: 50rpx;
		font-size: 28rpx;
		font-weight: 400;
		color: #999999;
		-webkit-line-clamp: 2;
		overflow: hidden;
		text-overflow: ellipsis;
		display: -webkit-box;
		-webkit-box-orient: vertical;
	}

	.news_fd1_0_c0_c2 {
		background: #eee;
		padding: 6rpx 12rpx 6rpx 12rpx;
		background-size: 100% auto;
		color: var(--benbenFontColor4);
	}

	.news_fd1_0_c0_c1 {
		background: #eee;
		padding: 6rpx 12rpx 6rpx 12rpx;
		background-size: 100% auto;
		color: var(--benbenFontColor0);
	}

	.news_fd1_0_c0_c0 {
		font-size: 32rpx;
		font-weight: 500;
		color: #333333;
		-webkit-line-clamp: 1;
		overflow: hidden;
		text-overflow: ellipsis;
		display: -webkit-box;
		-webkit-box-orient: vertical;
		line-height: 36rpx;
	}

	.news_fd1_0 {
		background: #fff;
		margin: 20rpx 32rpx 0rpx 32rpx;
		padding: 32rpx 24rpx 24rpx 24rpx;
		background-size: 100% auto !important;
		border-radius: 16rpx 16rpx 16rpx 16rpx;
	}
</style>